package vn.edu.hcmut.cse.ai.search.problems.blocksworld.predicate;

public class BinaryBlocksWorldPredicate extends BlocksWorldPredicate{
    protected int firstBlock;
    protected int secondBlock;
    
    public BinaryBlocksWorldPredicate(int firstBlock, int secondBlock) {
        super();
        this.firstBlock = firstBlock;
        this.secondBlock = secondBlock;
    }

    public int getFirstBlock() {
        return firstBlock;
    }

    public int getSecondBlock() {
        return secondBlock;
    }

    public void setFirstBlock(int firstBlock) {
        this.firstBlock = firstBlock;
    }

    public void setSecondBlock(int secondBlock) {
        this.secondBlock = secondBlock;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + this.firstBlock;
        hash = 97 * hash + this.secondBlock;
        hash = hash * (this.getPredicateType() + 1);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BinaryBlocksWorldPredicate other = (BinaryBlocksWorldPredicate) obj;
        return (this.firstBlock == other.firstBlock) && (this.secondBlock == other.secondBlock);
    }
    
    
}
